﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using aier.dataaccess.dapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using aier.dataaccess.model;

namespace aier.dataaccess.dapper
{
    [TestClass()]
    public class TaskDalUT
    {
        private TaskDal taskDal = null;

        [TestInitialize]
        public void Init()
        {
            taskDal = new TaskDal();
            taskDal.dapperHelper = new DapperHelper();
        }

        [TestMethod()]
        public void QueryTaskByLeadIdUT()
        {
            Console.WriteLine(taskDal.QueryTaskByLeadId(new Guid("3A4E9282-0E20-E511-80BE-00155D94EE04")).Count());
        }

        [TestMethod()]
        public void QueryTaskByOwnerIdUT()
        {
            Console.WriteLine(taskDal.QueryTaskByOwnerId(new Guid("FB14CD35-36AA-E411-80B6-00155D94EE04")).Count());
        }

        [TestMethod()]
        public void QueryTaskByOwnerIdUT1()
        {
            Console.WriteLine(taskDal.QueryTaskByOwnerIdPage(new Guid("FB14CD35-36AA-E411-80B6-00155D94EE04"), 1, 5, "desc").Count());
        }

        [TestMethod()]
        public void QueryTaskByLeadIdPageUT()
        {
            Console.WriteLine(taskDal.QueryTaskByLeadIdPage(new Guid("3A4E9282-0E20-E511-80BE-00155D94EE04"), 1, 5, "desc").Count());
        }

        [TestMethod()]
        public void QueryTaskInfoListUT()
        {
            var obj = taskDal.QueryTaskInfoList(new Guid("FB14CD35-36AA-E411-80B6-00155D94EE04"),null,"1",null,2,20);
            Console.WriteLine(obj.Count());
        }

        [TestMethod()]
        public void QueryTaskDataUT()
        {
            //ScreenNoticeView screenNoticeView = taskDal.GetScreenNoticeData(new Guid("A510FB27-A7F0-E811-8103-FB5493C0AA7A"));
            //Console.WriteLine(screenNoticeView);
        }
    }
}